package com.javachamp.exceptions;

public class ConstructorWithException {

	class A {
		public A() throws Exception{		}
		
		public A(int i) {}
	}

	class B extends A {
		public B() throws Exception {
			super(); // it's still optional :) 
		}
		
		B(int i) {
			super(i); // if do not use default constructor 
						// declaring a checked exception
		} 
	}
	
	class X {
		public X() throws RuntimeException{		}
	}
	
	class Y extends X {
		// declaring a default constructor is not required
		// since the parent class' constructor
		// declares that it throws an unchecked exception
	}
}
